<script setup lang="ts">
import { useRoute, useRouter } from 'vue-router'
import { ref } from 'vue';
import wbUrl from '../assets/wb.png';
import zhUrl from '../assets/zh.png';
import bdUrl from '../assets/bd.png';

const router = useRouter();

const onClickLeft = () => history.back();
const goTo = (path: string) => {
    router.push(`/mine/hotSearch/${path}`);
}
</script>

<template>
    <div class="hotSearch">
        <van-nav-bar title="新闻热搜" left-text="返回" left-arrow @click-left="onClickLeft" />
        <van-grid :column-num="2">
            <van-grid-item :icon="wbUrl" text="微博热搜" @click="goTo('wb')" />
            <van-grid-item :icon="zhUrl" text="知乎热搜" @click="goTo('zh')" />
            <van-grid-item :icon="bdUrl" text="百度热搜" @click="goTo('bd')" />
            <!-- <van-grid-item icon="photo-o" text="文字" /> -->
        </van-grid>
    </div>
</template>
<style scoped>
.mine {
    /* display: flex; */
}

.header {
    display: flex;
    padding: 1rem 0;
    justify-content: center;
}
</style>